from entity import Graph, Vertex, TreeNode


class Graph1:
    graph1 = Graph(8)
    v0 = Vertex(0)
    v1 = Vertex(1)
    v2 = Vertex(2)
    v3 = Vertex(3)
    v4 = Vertex(4)
    v5 = Vertex(5)
    v6 = Vertex(6)
    v7 = Vertex(7)
    v0.add_adj(v1)
    v0.add_adj(v2)
    v1.add_adj(v0)
    v1.add_adj(v2)
    v1.add_adj(v3)
    v2.add_adj(v0)
    v2.add_adj(v1)
    v2.add_adj(v4)
    v3.add_adj(v1)
    v3.add_adj(v4)
    v4.add_adj(v2)
    v4.add_adj(v3)
    v4.add_adj(v5)
    v5.add_adj(v3)
    v5.add_adj(v4)
    v6.add_adj(v7)
    v7.add_adj(v6)
    graph1.add_vertex(v0)
    graph1.add_vertex(v1)
    graph1.add_vertex(v2)
    graph1.add_vertex(v3)
    graph1.add_vertex(v4)
    graph1.add_vertex(v5)
    graph1.add_vertex(v6)
    graph1.add_vertex(v7)


class Tree1:
    tree1 = TreeNode(0)
    node1 = TreeNode(1)
    node2 = TreeNode(2)
    node3 = TreeNode(3)
    node4 = TreeNode(4)
    node5 = TreeNode(5)
    node6 = TreeNode(6)
    node7 = TreeNode(7)
    node8 = TreeNode(8)
    tree1.left = node1
    tree1.right = node2
    node1.left = node3
    node1.right = node4
    node2.left = node5
    node2.right = node6
    node4.left = node7
    node4.right = node8


class OneNodeTree:
    root = TreeNode(1)


class Bst:
    bst = TreeNode(5)
    node3 = TreeNode(3)
    node8 = TreeNode(8)
    node2 = TreeNode(2)
    node4 = TreeNode(4)
    node6 = TreeNode(6)
    node9 = TreeNode(9)
    bst.left = node3
    bst.right = node8
    node3.left = node2
    node3.right = node4
    node8.left = node6
    node8.right = node9


class AllLeftBst:
    all_left_bst = TreeNode(5)
    node4 = TreeNode(4)
    node3 = TreeNode(3)
    node2 = TreeNode(2)
    all_left_bst.left = node4
    node4.left = node3
    node3.left = node2


class AllRightBst:
    all_right_bst = TreeNode(5)
    node6 = TreeNode(6)
    node7 = TreeNode(7)
    node8 = TreeNode(8)
    all_right_bst.right = node6
    node6.right = node7
    node7.right = node8
